home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / gfx / nsIScriptableRegion.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  15KB  |  368 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIScriptableRegion.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIScriptableRegion_h__
  6. #define __gen_nsIScriptableRegion_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIRegion;
  18.  
  19. /* starting interface:    nsIScriptableRegion */
  20. #define NS_ISCRIPTABLEREGION_IID_STR "82d8f400-5bde-11d3-b033-b27a62766bbc"
  21.  
  22. #define NS_ISCRIPTABLEREGION_IID \
  23.   {0x82d8f400, 0x5bde, 0x11d3, \
  24.     { 0xb0, 0x33, 0xb2, 0x7a, 0x62, 0x76, 0x6b, 0xbc }}
  25.  
  26. class NS_NO_VTABLE nsIScriptableRegion : public nsISupports {
  27.  public: 
  28.  
  29.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISCRIPTABLEREGION_IID)
  30.  
  31.   /* void init (); */
  32.   NS_IMETHOD Init(void) = 0;
  33.  
  34.   /**
  35.   * copy operator equivalent that takes another region
  36.   *
  37.   * @param      region to copy
  38.   * @return     void
  39.   *
  40.   **/
  41.   /* void setToRegion (in nsIScriptableRegion aRegion); */
  42.   NS_IMETHOD SetToRegion(nsIScriptableRegion *aRegion) = 0;
  43.  
  44.   /**
  45.   * copy operator equivalent that takes a rect
  46.   *
  47.   * @param      aX xoffset of rect to set region to
  48.   * @param      aY yoffset of rect to set region to
  49.   * @param      aWidth width of rect to set region to
  50.   * @param      aHeight height of rect to set region to
  51.   * @return     void
  52.   *
  53.   **/
  54.   /* void setToRect (in long aX, in long aY, in long aWidth, in long aHeight); */
  55.   NS_IMETHOD SetToRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) = 0;
  56.  
  57.   /**
  58.   * destructively intersect another region with this one
  59.   *
  60.   * @param      region to intersect
  61.   * @return     void
  62.   *
  63.   **/
  64.   /* void intersectRegion (in nsIScriptableRegion aRegion); */
  65.   NS_IMETHOD IntersectRegion(nsIScriptableRegion *aRegion) = 0;
  66.  
  67.   /**
  68.   * destructively intersect a rect with this region
  69.   *
  70.   * @param      aX xoffset of rect to intersect with region
  71.   * @param      aY yoffset of rect to intersect with region
  72.   * @param      aWidth width of rect to intersect with region
  73.   * @param      aHeight height of rect to intersect with region
  74.   * @return     void
  75.   *
  76.   **/
  77.   /* void intersectRect (in long aX, in long aY, in long aWidth, in long aHeight); */
  78.   NS_IMETHOD IntersectRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) = 0;
  79.  
  80.   /**
  81.   * destructively union another region with this one
  82.   *
  83.   * @param      region to union
  84.   * @return     void
  85.   *
  86.   **/
  87.   /* void unionRegion (in nsIScriptableRegion aRegion); */
  88.   NS_IMETHOD UnionRegion(nsIScriptableRegion *aRegion) = 0;
  89.  
  90.   /**
  91.   * destructively union a rect with this region
  92.   *
  93.   * @param      aX xoffset of rect to union with region
  94.   * @param      aY yoffset of rect to union with region
  95.   * @param      aWidth width of rect to union with region
  96.   * @param      aHeight height of rect to union with region
  97.   * @return     void
  98.   *
  99.   **/
  100.   /* void unionRect (in long aX, in long aY, in long aWidth, in long aHeight); */
  101.   NS_IMETHOD UnionRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) = 0;
  102.  
  103.   /**
  104.   * destructively subtract another region with this one
  105.   *
  106.   * @param      region to subtract
  107.   * @return     void
  108.   *
  109.   **/
  110.   /* void subtractRegion (in nsIScriptableRegion aRegion); */
  111.   NS_IMETHOD SubtractRegion(nsIScriptableRegion *aRegion) = 0;
  112.  
  113.   /**
  114.   * destructively subtract a rect from this region
  115.   *
  116.   * @param      aX xoffset of rect to subtract with region
  117.   * @param      aY yoffset of rect to subtract with region
  118.   * @param      aWidth width of rect to subtract with region
  119.   * @param      aHeight height of rect to subtract with region
  120.   * @return     void
  121.   *
  122.   **/
  123.   /* void subtractRect (in long aX, in long aY, in long aWidth, in long aHeight); */
  124.   NS_IMETHOD SubtractRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) = 0;
  125.  
  126.   /**
  127.   * is this region empty? i.e. does it contain any pixels
  128.   *
  129.   * @param      none
  130.   * @return     returns whether the region is empty
  131.   *
  132.   **/
  133.   /* boolean isEmpty (); */
  134.   NS_IMETHOD IsEmpty(PRBool *_retval) = 0;
  135.  
  136.   /**
  137.   * == operator equivalent i.e. do the regions contain exactly
  138.   * the same pixels
  139.   *
  140.   * @param      region to compare
  141.   * @return     whether the regions are identical
  142.   *
  143.   **/
  144.   /* boolean isEqualRegion (in nsIScriptableRegion aRegion); */
  145.   NS_IMETHOD IsEqualRegion(nsIScriptableRegion *aRegion, PRBool *_retval) = 0;
  146.  
  147.   /**
  148.   * returns the bounding box of the region i.e. the smallest
  149.   * rectangle that completely contains the region.        
  150.   *
  151.   * @param      aX out parameter for xoffset of bounding rect for region
  152.   * @param      aY out parameter for yoffset of bounding rect for region
  153.   * @param      aWidth out parameter for width of bounding rect for region
  154.   * @param      aHeight out parameter for height of bounding rect for region
  155.   * @return     void
  156.   *
  157.   **/
  158.   /* void getBoundingBox (out long aX, out long aY, out long aWidth, out long aHeight); */
  159.   NS_IMETHOD GetBoundingBox(PRInt32 *aX, PRInt32 *aY, PRInt32 *aWidth, PRInt32 *aHeight) = 0;
  160.  
  161.   /**
  162.   * offsets the region in x and y
  163.   *
  164.   * @param  xoffset  pixel offset in x
  165.   * @param  yoffset  pixel offset in y
  166.   * @return          void
  167.   *
  168.   **/
  169.   /* void offset (in long aXOffset, in long aYOffset); */
  170.   NS_IMETHOD Offset(PRInt32 aXOffset, PRInt32 aYOffset) = 0;
  171.  
  172.   /**
  173.   * does the region intersect the rectangle?
  174.   *
  175.   * @param      rect to check for containment
  176.   * @return     true if the region intersects the rect
  177.   *
  178.   **/
  179.   /* boolean containsRect (in long aX, in long aY, in long aWidth, in long aHeight); */
  180.   NS_IMETHOD ContainsRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight, PRBool *_retval) = 0;
  181.  
  182.   /* [noscript] readonly attribute nsIRegion region; */
  183.   NS_IMETHOD GetRegion(nsIRegion * *aRegion) = 0;
  184.  
  185. };
  186.  
  187. /* Use this macro when declaring classes that implement this interface. */
  188. #define NS_DECL_NSISCRIPTABLEREGION \
  189.   NS_IMETHOD Init(void); \
  190.   NS_IMETHOD SetToRegion(nsIScriptableRegion *aRegion); \
  191.   NS_IMETHOD SetToRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight); \
  192.   NS_IMETHOD IntersectRegion(nsIScriptableRegion *aRegion); \
  193.   NS_IMETHOD IntersectRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight); \
  194.   NS_IMETHOD UnionRegion(nsIScriptableRegion *aRegion); \
  195.   NS_IMETHOD UnionRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight); \
  196.   NS_IMETHOD SubtractRegion(nsIScriptableRegion *aRegion); \
  197.   NS_IMETHOD SubtractRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight); \
  198.   NS_IMETHOD IsEmpty(PRBool *_retval); \
  199.   NS_IMETHOD IsEqualRegion(nsIScriptableRegion *aRegion, PRBool *_retval); \
  200.   NS_IMETHOD GetBoundingBox(PRInt32 *aX, PRInt32 *aY, PRInt32 *aWidth, PRInt32 *aHeight); \
  201.   NS_IMETHOD Offset(PRInt32 aXOffset, PRInt32 aYOffset); \
  202.   NS_IMETHOD ContainsRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight, PRBool *_retval); \
  203.   NS_IMETHOD GetRegion(nsIRegion * *aRegion); 
  204.  
  205. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  206. #define NS_FORWARD_NSISCRIPTABLEREGION(_to) \
  207.   NS_IMETHOD Init(void) { return _to Init(); } \
  208.   NS_IMETHOD SetToRegion(nsIScriptableRegion *aRegion) { return _to SetToRegion(aRegion); } \
  209.   NS_IMETHOD SetToRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) { return _to SetToRect(aX, aY, aWidth, aHeight); } \
  210.   NS_IMETHOD IntersectRegion(nsIScriptableRegion *aRegion) { return _to IntersectRegion(aRegion); } \
  211.   NS_IMETHOD IntersectRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) { return _to IntersectRect(aX, aY, aWidth, aHeight); } \
  212.   NS_IMETHOD UnionRegion(nsIScriptableRegion *aRegion) { return _to UnionRegion(aRegion); } \
  213.   NS_IMETHOD UnionRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) { return _to UnionRect(aX, aY, aWidth, aHeight); } \
  214.   NS_IMETHOD SubtractRegion(nsIScriptableRegion *aRegion) { return _to SubtractRegion(aRegion); } \
  215.   NS_IMETHOD SubtractRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) { return _to SubtractRect(aX, aY, aWidth, aHeight); } \
  216.   NS_IMETHOD IsEmpty(PRBool *_retval) { return _to IsEmpty(_retval); } \
  217.   NS_IMETHOD IsEqualRegion(nsIScriptableRegion *aRegion, PRBool *_retval) { return _to IsEqualRegion(aRegion, _retval); } \
  218.   NS_IMETHOD GetBoundingBox(PRInt32 *aX, PRInt32 *aY, PRInt32 *aWidth, PRInt32 *aHeight) { return _to GetBoundingBox(aX, aY, aWidth, aHeight); } \
  219.   NS_IMETHOD Offset(PRInt32 aXOffset, PRInt32 aYOffset) { return _to Offset(aXOffset, aYOffset); } \
  220.   NS_IMETHOD ContainsRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight, PRBool *_retval) { return _to ContainsRect(aX, aY, aWidth, aHeight, _retval); } \
  221.   NS_IMETHOD GetRegion(nsIRegion * *aRegion) { return _to GetRegion(aRegion); } 
  222.  
  223. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  224. #define NS_FORWARD_SAFE_NSISCRIPTABLEREGION(_to) \
  225.   NS_IMETHOD Init(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(); } \
  226.   NS_IMETHOD SetToRegion(nsIScriptableRegion *aRegion) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetToRegion(aRegion); } \
  227.   NS_IMETHOD SetToRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetToRect(aX, aY, aWidth, aHeight); } \
  228.   NS_IMETHOD IntersectRegion(nsIScriptableRegion *aRegion) { return !_to ? NS_ERROR_NULL_POINTER : _to->IntersectRegion(aRegion); } \
  229.   NS_IMETHOD IntersectRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->IntersectRect(aX, aY, aWidth, aHeight); } \
  230.   NS_IMETHOD UnionRegion(nsIScriptableRegion *aRegion) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnionRegion(aRegion); } \
  231.   NS_IMETHOD UnionRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnionRect(aX, aY, aWidth, aHeight); } \
  232.   NS_IMETHOD SubtractRegion(nsIScriptableRegion *aRegion) { return !_to ? NS_ERROR_NULL_POINTER : _to->SubtractRegion(aRegion); } \
  233.   NS_IMETHOD SubtractRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->SubtractRect(aX, aY, aWidth, aHeight); } \
  234.   NS_IMETHOD IsEmpty(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsEmpty(_retval); } \
  235.   NS_IMETHOD IsEqualRegion(nsIScriptableRegion *aRegion, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsEqualRegion(aRegion, _retval); } \
  236.   NS_IMETHOD GetBoundingBox(PRInt32 *aX, PRInt32 *aY, PRInt32 *aWidth, PRInt32 *aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBoundingBox(aX, aY, aWidth, aHeight); } \
  237.   NS_IMETHOD Offset(PRInt32 aXOffset, PRInt32 aYOffset) { return !_to ? NS_ERROR_NULL_POINTER : _to->Offset(aXOffset, aYOffset); } \
  238.   NS_IMETHOD ContainsRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ContainsRect(aX, aY, aWidth, aHeight, _retval); } \
  239.   NS_IMETHOD GetRegion(nsIRegion * *aRegion) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRegion(aRegion); } 
  240.  
  241. #if 0
  242. /* Use the code below as a template for the implementation class for this interface. */
  243.  
  244. /* Header file */
  245. class nsScriptableRegion : public nsIScriptableRegion
  246. {
  247. public:
  248.   NS_DECL_ISUPPORTS
  249.   NS_DECL_NSISCRIPTABLEREGION
  250.  
  251.   nsScriptableRegion();
  252.  
  253. private:
  254.   ~nsScriptableRegion();
  255.  
  256. protected:
  257.   /* additional members */
  258. };
  259.  
  260. /* Implementation file */
  261. NS_IMPL_ISUPPORTS1(nsScriptableRegion, nsIScriptableRegion)
  262.  
  263. nsScriptableRegion::nsScriptableRegion()
  264. {
  265.   /* member initializers and constructor code */
  266. }
  267.  
  268. nsScriptableRegion::~nsScriptableRegion()
  269. {
  270.   /* destructor code */
  271. }
  272.  
  273. /* void init (); */
  274. NS_IMETHODIMP nsScriptableRegion::Init()
  275. {
  276.     return NS_ERROR_NOT_IMPLEMENTED;
  277. }
  278.  
  279. /* void setToRegion (in nsIScriptableRegion aRegion); */
  280. NS_IMETHODIMP nsScriptableRegion::SetToRegion(nsIScriptableRegion *aRegion)
  281. {
  282.     return NS_ERROR_NOT_IMPLEMENTED;
  283. }
  284.  
  285. /* void setToRect (in long aX, in long aY, in long aWidth, in long aHeight); */
  286. NS_IMETHODIMP nsScriptableRegion::SetToRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)
  287. {
  288.     return NS_ERROR_NOT_IMPLEMENTED;
  289. }
  290.  
  291. /* void intersectRegion (in nsIScriptableRegion aRegion); */
  292. NS_IMETHODIMP nsScriptableRegion::IntersectRegion(nsIScriptableRegion *aRegion)
  293. {
  294.     return NS_ERROR_NOT_IMPLEMENTED;
  295. }
  296.  
  297. /* void intersectRect (in long aX, in long aY, in long aWidth, in long aHeight); */
  298. NS_IMETHODIMP nsScriptableRegion::IntersectRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)
  299. {
  300.     return NS_ERROR_NOT_IMPLEMENTED;
  301. }
  302.  
  303. /* void unionRegion (in nsIScriptableRegion aRegion); */
  304. NS_IMETHODIMP nsScriptableRegion::UnionRegion(nsIScriptableRegion *aRegion)
  305. {
  306.     return NS_ERROR_NOT_IMPLEMENTED;
  307. }
  308.  
  309. /* void unionRect (in long aX, in long aY, in long aWidth, in long aHeight); */
  310. NS_IMETHODIMP nsScriptableRegion::UnionRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)
  311. {
  312.     return NS_ERROR_NOT_IMPLEMENTED;
  313. }
  314.  
  315. /* void subtractRegion (in nsIScriptableRegion aRegion); */
  316. NS_IMETHODIMP nsScriptableRegion::SubtractRegion(nsIScriptableRegion *aRegion)
  317. {
  318.     return NS_ERROR_NOT_IMPLEMENTED;
  319. }
  320.  
  321. /* void subtractRect (in long aX, in long aY, in long aWidth, in long aHeight); */
  322. NS_IMETHODIMP nsScriptableRegion::SubtractRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)
  323. {
  324.     return NS_ERROR_NOT_IMPLEMENTED;
  325. }
  326.  
  327. /* boolean isEmpty (); */
  328. NS_IMETHODIMP nsScriptableRegion::IsEmpty(PRBool *_retval)
  329. {
  330.     return NS_ERROR_NOT_IMPLEMENTED;
  331. }
  332.  
  333. /* boolean isEqualRegion (in nsIScriptableRegion aRegion); */
  334. NS_IMETHODIMP nsScriptableRegion::IsEqualRegion(nsIScriptableRegion *aRegion, PRBool *_retval)
  335. {
  336.     return NS_ERROR_NOT_IMPLEMENTED;
  337. }
  338.  
  339. /* void getBoundingBox (out long aX, out long aY, out long aWidth, out long aHeight); */
  340. NS_IMETHODIMP nsScriptableRegion::GetBoundingBox(PRInt32 *aX, PRInt32 *aY, PRInt32 *aWidth, PRInt32 *aHeight)
  341. {
  342.     return NS_ERROR_NOT_IMPLEMENTED;
  343. }
  344.  
  345. /* void offset (in long aXOffset, in long aYOffset); */
  346. NS_IMETHODIMP nsScriptableRegion::Offset(PRInt32 aXOffset, PRInt32 aYOffset)
  347. {
  348.     return NS_ERROR_NOT_IMPLEMENTED;
  349. }
  350.  
  351. /* boolean containsRect (in long aX, in long aY, in long aWidth, in long aHeight); */
  352. NS_IMETHODIMP nsScriptableRegion::ContainsRect(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight, PRBool *_retval)
  353. {
  354.     return NS_ERROR_NOT_IMPLEMENTED;
  355. }
  356.  
  357. /* [noscript] readonly attribute nsIRegion region; */
  358. NS_IMETHODIMP nsScriptableRegion::GetRegion(nsIRegion * *aRegion)
  359. {
  360.     return NS_ERROR_NOT_IMPLEMENTED;
  361. }
  362.  
  363. /* End of implementation class template. */
  364. #endif
  365.  
  366.  
  367. #endif /* __gen_nsIScriptableRegion_h__ */
  368.